public class VehicalTest
{
    public static void main(String[] args)
    {
        Developer dev = new Developer("张三", 22);

        Vehicle[] v = new Vehicle[3];

        v[0] = new Bicycle("捷安特", "蓝色");

        v[1] = new ElectricVehicle("雅迪", "黑色");


        v[2] = new Car("奔驰", "黑色", "100001");

        for (int i = 0; i < v.length; i++)
        {
            dev.takingVehicle(v[i]);

            if (v[i] instanceof IPower)
            {
                ((IPower)v[i]).power();
            }
        }

        ElectricVehicle e1 = new ElectricVehicle("雅迪", "黑色");
        e1.power();
    }
}
